---
title: 'Populist attitudes towards politics and science: How do they differ?'
author: Eberl, Jakob-Moritz, Robert A. Huber, Niels G. Mede, Esther Greussing
output:
  rmdformats::downcute:
    self_contained: true
    thumbnails: true
    lightbox: true
    gallery: false
    highlight: tango
editor_options:
  chunk_output_type: console
---

```{r globopt, include = F}
knitr::opts_chunk$set(warning = FALSE)
```

In this notebook, we explain the replication code of our analysis in more detail. 

# How to proceed

First download all files available from the Harvard Dataverse (see <https://doi.org/10.7910/DVN/JRI186>) in a folder of choice. The next steps of the analysis are outlined in the script below.

Note that we cannot share the ACPP survey data for legal reasons. You can obtain and download it through this website: <https://viecer.univie.ac.at/coronapanel/austrian-corona-panel-data/method-report/>. Rename it as ACPP_data.dta for this replication code. 

# Prepare analysis

First download all files from the project file "Replication_Eberl_et_al_PRX.Rproj" to a folder of your choice. Open it in R-Studio and load the "README.Rmd" file. The next lines of code automatically set the working directory. 

```{r}
# Set wd with here() package

here::i_am("Replication_Eberl_et_al_PRX.Rproj")

# Clean Environment
rm(list = ls())
```

# Replication

Open the R-Script "replication_code" from the folder. It contains all steps to replicate the findings in the paper.

```{r, echo=FALSE, results='hide', warning=FALSE, error=FALSE, message=FALSE, }
source("replication_code.R")

```


# Session Info

This notebook was run using the following setup:

```{r}
pander::pander(sessionInfo())
```
